home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 5.9 KB | 238 lines | [TEXT/MPS ] |
- ;
- ; File: ControlStrip.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__CONTROLSTRIP__') = 'UNDEFINED' THEN
- __CONTROLSTRIP__ SET 1
-
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
- include 'Menus.a'
- ENDIF
- ; include 'Memory.a' ;
- ; include 'MixedMode.a' ;
- ; include 'Quickdraw.a' ;
- ; include 'QuickdrawText.a' ;
- ; include 'Events.a' ;
- ; include 'OSUtils.a' ;
-
- IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
- include 'Dialogs.a'
- ENDIF
- ; include 'Errors.a' ;
- ; include 'Windows.a' ;
- ; include 'Controls.a' ;
- ; include 'TextEdit.a' ;
-
- sdevInitModule EQU 0 ; initialize the module
- sdevCloseModule EQU 1 ; clean up before being closed
- sdevFeatures EQU 2 ; return feature bits
- sdevGetDisplayWidth EQU 3 ; returns the width of the module's display
- sdevPeriodicTickle EQU 4 ; periodic tickle when nothing else is happening
- sdevDrawStatus EQU 5 ; update the interface in the Control Strip
- sdevMouseClick EQU 6 ; user clicked on the module's display area in the Control Strip
- sdevSaveSettings EQU 7 ; saved any changed settings in module's preferences file
- sdevShowBalloonHelp EQU 8 ; puts up a help balloon, if the module has one to display
-
- ;********************************************************************************************
- ;
- ; Features supported by the module. If a bit is set, it means that feature is supported.
- ; All undefined bits are reserved for future use by Apple, and should be set to zero.
- ;
- ;********************************************************************************************
- sdevWantMouseClicks EQU 0 ; notify the module of mouseDown events
- sdevDontAutoTrack EQU 1 ; call the module to do mouse tracking
- sdevHasCustomHelp EQU 2 ; module provides its own help messages
- sdevKeepModuleLocked EQU 3 ; module needs to be locked in the heap
-
- ;********************************************************************************************
- ;
- ; Result values returned by the sdevPeriodicTickle and sdevIconMouseClick selectors.
- ; If a bit is set, the module can request that a specific function is performed by
- ; the Control Strip. A result of zero will do nothing. All undefined bits are reserved
- ; for future use by Apple, and should be set to zero.
- ;
- ;********************************************************************************************
- sdevResizeDisplay EQU 0 ; resize the module's display
- sdevNeedToSave EQU 1 ; need to save changed settings, when convenient
- sdevHelpStateChange EQU 2 ; need to update the help message because of a state change
- sdevCloseNow EQU 3 ; close a module because it doesn't want to stay around
-
- ;********************************************************************************************
- ;
- ; miscellaneous
- ;
- ;********************************************************************************************
- sdevFileType EQU 'sdev'
-
- sdevMenuItemMark EQU '•'
-
- ; direction values for SBDrawBarGraph
- BarGraphSlopeLeft EQU -1 ; max end of sloping bar graph is on the left
- BarGraphFlatRight EQU 0 ; max end of flat bar graph is on the right
- BarGraphSlopeRight EQU 1 ; max end of sloping bar graph is on the right
-
- ;********************************************************************************************
- ;
- ; utility routines to provide standard interface elements and support for common functions
- ;
- ;********************************************************************************************
- IF GENERATING68K THEN
- Macro
- _SBIsControlStripVisible
- moveq #0,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBIsControlStripVisible
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBShowHideControlStrip
- move.w #$0101,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBShowHideControlStrip
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBSafeToAccessStartupDisk
- moveq #2,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBSafeToAccessStartupDisk
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBOpenModuleResourceFile
- move.w #$0203,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBOpenModuleResourceFile
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBLoadPreferences
- move.w #$0404,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBLoadPreferences
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBSavePreferences
- move.w #$0405,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBSavePreferences
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBGetDetachedIndString
- move.w #$0506,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBGetDetachedIndString
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBGetDetachIconSuite
- move.w #$0507,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBGetDetachIconSuite
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBTrackPopupMenu
- move.w #$0408,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBTrackPopupMenu
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBTrackSlider
- move.w #$0409,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBTrackSlider
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBShowHelpString
- move.w #$040A,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBShowHelpString
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBGetBarGraphWidth
- move.w #$010B,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBGetBarGraphWidth
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBDrawBarGraph
- move.w #$050C,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBDrawBarGraph
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SBModalDialogInContext
- move.w #$040D,d0
- dc.w $AAF2
- EndM
- ELSE
- IMPORT SBModalDialogInContext
- ENDIF
-
- ENDIF ; __CONTROLSTRIP__
-